package com.jeesite.modules.mo.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 账单流水表Entity
 * @author 李寒冰
 * @version 2025-01-25
 */
@Table(name="mo_liushui", alias="a", label="账单流水表信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="user_id", attrName="userId", label="用户id"),
		@Column(name="jine", attrName="jine", label="金额", isUpdateForce=true),
		@Column(name="type", attrName="type", label="1设备收益 2提现 3任务付款 4任务收益 5任务退款 6充值 7设备提成 8任务分成", isUpdateForce=true),
		@Column(name="create_time", attrName="createTime", label="时间", isUpdateForce=true),
		@Column(name="tab_no", attrName="tabNo", label="流水号", comment="流水号（主表id）"),
	}, orderBy="a.id DESC"
)
public class MoLiushui extends DataEntity<MoLiushui> {
	
	private static final long serialVersionUID = 1L;
	private String userId;		// 用户id
	private Double jine;		// 金额
	private Long type;		// 1设备收益 2提现 3任务付款 4任务收益 5任务退款 6充值 7设备提成 8任务分成
	private Date createTime;		// 时间
	private String tabNo;		// 流水号（主表id）

	public MoLiushui() {
		this(null);
	}
	
	public MoLiushui(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="用户id长度不能超过 50 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public Double getJine() {
		return jine;
	}

	public void setJine(Double jine) {
		this.jine = jine;
	}
	
	public Long getType() {
		return type;
	}

	public void setType(Long type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Size(min=0, max=50, message="流水号长度不能超过 50 个字符")
	public String getTabNo() {
		return tabNo;
	}

	public void setTabNo(String tabNo) {
		this.tabNo = tabNo;
	}
	
}